#!/usr/bin/python2.6
# exemple d'utilisation de la lib-pam-python
# teste le login et le pass

import PAM

p = PAM.pam()
service = 'su'
p.start(service)
try:
    p.authenticate()
except PAM.error:
    print "Bad",
else:
    print "Good",
finally:
    print " password!"
